<?php
$ArPositions = Dracosys::getSessionValue(SESSION_INTERFACE, 'PositionList');
$ArActions = Dracosys::getSessionValue(SESSION_INTERFACE, 'ActionList');
?>
<h2>Cadastrar Perfil</h2>
<section id="CreateProfile">
    <form method="post" action="perfil/inserir" name="FormCriarPerfil">
        <section id="CreateProfile_Dados" class="section-update">
            <div class="out_txt big"><label for="CreateProfile_IDFuncao">Função</label></div>
            <div class="inp_txt big">
                <select name="IDFuncao" id="CreateProfile_IDFuncao">
                    <?php foreach($ArPositions as $Position): ?>
                        <option value="<?=$Position->getIDFuncao()?>"><?=$Position->getStNome()?></option>
                    <?php endforeach; ?>
                </select>
            </div>
            <div class="out_txt big"><label for="CreateProfile_StPerfil">Nome do Perfil</label></div>
            <div class="inp_txt big"><input type="text" name="StPerfil" id="CreateProfile_StPerfil" value="" /></div>
            <div class="sessionTitle">Ações deste Perfil</div>
            <?php foreach($ArActions as $Action): ?>
                <div class="out_txt small"><label for="CreateProfile_<?=$Action->getIDAcao()?>"><?=$Action->getStAcao()?></label></div>
                <div class="inp_txt small"><input type="checkbox" name="Action<?=$Action->getIDAcao()?>" value="<?=$Action->getIDAcao()?>" id="CreateProfile_<?=$Action->getIDAcao()?>"></div>
            <?php endforeach; ?>
        </section>
        <div class="btn"><button class="v1">Cadastrar</button></div>
    </form>
</section>